package com.unitedvision.service;

import java.util.List;

import javax.persistence.EntityNotFoundException;

import com.unitedvision.core.domain.CompanyBillingStatus;
import com.unitedvision.core.domain.Status;
import com.unitedvision.persistence.domain.CompanyBillEntity;
import com.unitedvision.persistence.domain.CompanyEntity;
import com.unitedvision.persistence.domain.CompanyModuleEntity;
import com.unitedvision.persistence.domain.CustomerEntity;
import com.unitedvision.persistence.domain.ModuleEntity;
import com.unitedvision.persistence.domain.PeriodeValue;

public interface CompanyService {
	void add(CustomerEntity customer, String description);
	void update(int id, CustomerEntity customer, String description);
	void activateCompany(CompanyEntity companyEntity);
	void deactivateCompany(CompanyEntity companyEntity);
	void delete(CompanyEntity companyEntity);
	CompanyEntity get(int id) throws EntityNotFoundException;
	List<CompanyEntity> getAll() throws EntityNotFoundException;
	CompanyEntity getOneByCustomer(CustomerEntity customerEntity) throws EntityNotFoundException;
	List<CompanyEntity> getByStatus(Status status) throws EntityNotFoundException;
	long count();
	
	void save(CompanyModuleEntity companyModule);
	void delete(CompanyModuleEntity companyModule);
	CompanyModuleEntity getCompanyModule(int id) throws EntityNotFoundException;
	List<CompanyModuleEntity> getCompanyModuleByModule(ModuleEntity module) throws EntityNotFoundException;
	List<CompanyModuleEntity> getCompanyModuleByCompany(CompanyEntity company) throws EntityNotFoundException;
	long countCompanyModule();
	
	void save(CompanyBillEntity companyBill);
	void delete(CompanyBillEntity companyBill);
	CompanyBillEntity getBill(int id) throws EntityNotFoundException;
	List<CompanyBillEntity> getAllBill() throws EntityNotFoundException;
	List<CompanyBillEntity> getBillByCompany(CompanyEntity company) throws EntityNotFoundException;
	List<CompanyBillEntity> getBillByStatus(CompanyBillingStatus status) throws EntityNotFoundException;
	List<CompanyBillEntity> getBillByPeriode(PeriodeValue periode) throws EntityNotFoundException;
	long countBill();
}
